export interface Rectangle {
    x: number;
    y: number;
    width: number;
    height: number;
    fill: string;
    number: number;
    originalX: number;
    originalY: number;
    targetIndex: number | null;
    canSplit:boolean;
    locked?: boolean; 
    side?: string;
  }
  
  export interface TargetBox {
    x: number;
    y: number;
    width: number;
    height: number;
    color: string;
    matched: boolean;
    occupied: boolean;
    occupiedBy: number | null;
    side?: string;
  }
  
  export interface MergedRectangle {
    x: number;
    y: number;
    width: number;
    height: number;
    fill: string;
  }
  
  export interface LevelConfig {
    name?: string;
    description?: string;
    rectangles: Rectangle[];
    targetBoxes: TargetBox[];
    mergedRectangle: MergedRectangle;
    split:boolean;
    type?:string;
    requiredSum?:number;
  }
  
  export const levels: LevelConfig[] = [
    //基础组合-拆分关
    {
      name: "第一关 - 两个方块1",
      description: "将两个方块拖到底部的虚线框,看看会发生什么？",
      rectangles: [
        {
          x: 100, y: 200, width: 200, height: 200,
          fill: "#ff0000", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 350, y: 200, width: 200, height: 200,
          fill: "#ff0000", number: 2,
          originalX: 350, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#00ff00"
      },
      split:false
    },
    {
      name: "第二关 - 方块1和方块2",
      description: "方块1和方块2在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 200, height: 200,
          fill: "#00ff00", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 400, y: 200, width: 400, height: 200,
          fill: "#00ff00", number: 2,
          originalX: 400, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#0000ff"
      },
      split:false
    },
    {
      name: "第三关 - 方块2和方块1",
      description: "方块2和方块1在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 400, height: 200,
          fill: "#0000ff", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 600, y: 200, width: 200, height: 200,
          fill: "#0000ff", number: 2,
          originalX: 600, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#00ffff"
      },
      split:false
    },
    {
      name: "第四关 - 方块1和方块3",
      description: "方块1和方块3在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 200, height: 200,
          fill: "#00ffff", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 400, y: 200, width: 600, height: 200,
          fill: "#00ffff", number: 2,
          originalX: 400, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 600, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#ffff00"
      },
      split:false
    },
    {
      name: "第五关 - 方块3和方块1",
      description: "方块3和方块1在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 600, height: 200,
          fill: "#ffff00", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 800, y: 200, width: 200, height: 200,
          fill: "#ffff00", number: 2,
          originalX: 800, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 600, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f00000"
      },
      split:false
    },
    {
      name: "第六关 - 方块2和方块2",
      description: "方块2和方块2在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 400, height: 200,
          fill: "#f00000", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 600, y: 200, width: 400, height: 200,
          fill: "#f00000", number: 2,
          originalX: 600, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f0f000"
      },
      split:false
    },
    {
      name: "第七关 - 方块1和方块4",
      description: "方块1和方块4在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 180, height: 180,
          fill: "#f0f000", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 300, y: 200, width: 720, height: 180,
          fill: "#f0f000", number: 2,
          originalX: 300, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 180, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 720, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#00f0f0"
      },
      split:false
    },
    {
      name: "第八关 - 方块2和方块3",
      description: "方块2和方块3在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 360, height: 180,
          fill: "#00f0f0", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 480, y: 200, width: 540, height: 180,
          fill: "#00f0f0", number: 2,
          originalX: 480, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 360, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 540, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f000f0"
      },
      split:false
    },
    {
      name: "第九关 - 方块3和方块2",
      description: "方块3和方块2在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 540, height: 180,
          fill: "#f000f0", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 660, y: 200, width: 360, height: 180,
          fill: "#f000f0", number: 2,
          originalX: 660, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 540, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 360, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f00f00"
      },
      split:false
    },
    {
      name: "第十关 - 方块4和方块1",
      description: "方块4和方块1在一起会变成多少呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 720, height: 180,
          fill: "#f00f00", number: 1,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit:false
        },
        {
          x: 840, y: 200, width: 180, height: 180,
          fill: "#f00f00", number: 2,
          originalX: 840, originalY: 200, targetIndex: null,
          canSplit:false
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 720, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 180, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f0000f"
      },
      split:false
    },
    {
      name: "第十一关 - 拆分方块2",
      description: "方块2可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 300, y: 200, width: 400, height: 200,
          fill: "#f0000f", number: 2,
          originalX: 300, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f000ff"
      },
      split: true
    },
    {
      name: "第十二关 - 拆分方块3",
      description: "方块3可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 300, y: 200, width: 600, height: 200,
          fill: "#f000ff", number: 2,
          originalX: 300, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#f00fff"
      },
      split: true
    },
    {
      name: "第十三关 - 拆分方块3",
      description: "方块3还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 300, y: 200, width: 600, height: 200,
          fill: "#f00fff", number: 2,
          originalX: 300, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#0fff0f"
      },
      split: true
    },
    {
      name: "第十四关 - 拆分方块4",
      description: "方块4可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 800, height: 200,
          fill: "#0fff0f", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 600, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#0fffff"
      },
      split: true
    },
    {
      name: "第十五关 - 拆分方块4",
      description: "方块4还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 800, height: 200,
          fill: "#0fffff", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 400, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#fa00fa"
      },
      split: true
    },
    {
      name: "第十六关 - 拆分方块4",
      description: "方块4还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 800, height: 200,
          fill: "#fa00fa", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 600, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 200, height: 200, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#77AA33"
      },
      split: true
    },
    {
      name: "第十七关 - 拆分方块5",
      description: "方块5可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 900, height: 180,
          fill: "#77AA33", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 180, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 720, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#77AA88"
      },
      split: true
    },
    {
      name: "第十八关 - 拆分方块5",
      description: "方块5还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 900, height: 180,
          fill: "#77AA88", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 360, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 540, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#33AA88"
      },
      split: true
    },
    {
      name: "第十九关 - 拆分方块5",
      description: "方块5还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 900, height: 180,
          fill: "#33AA88", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 540, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 360, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#33AA11"
      },
      split: true
    },
    {
      name: "第二十关 - 拆分方块5",
      description: "方块5还可以分成哪两个方块呢？",
      rectangles: [
        {
          x: 100, y: 200, width: 900, height: 180,
          fill: "#33AA11", number: 2,
          originalX: 100, originalY: 200, targetIndex: null,
          canSplit: true // 标记可以分割
        }
      ],
      targetBoxes: [
        { x: 0, y: 0, width: 720, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null },
        { x: 0, y: 0, width: 180, height: 180, color: "#333", 
          matched: false, occupied: false, occupiedBy: null }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#773377"
      },
      split: true
    },
    // 平衡关
    {
      name: "第二十一关 - 天平平衡1",
      description: "让天平两边数字都等于2",
      rectangles: [
        {
          x: 150, y: 200, width: 80, height: 80,
          fill: "#ff6790", number: 1,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 250, y: 200, width: 80, height: 80,
          fill: "#ff6790", number: 1,
          originalX: 250, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 160, height: 80,
          fill: "#88ff89", number: 2,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      // 动态生成目标框，数量与矩形数量一致
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 80, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 80, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 160, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#908765"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 2 // 两边总和需要达到的值
    },
    {
      name: "第二十二关 - 天平平衡",
      description: "让天平两边数字都等于3",
      rectangles: [
        {
          x: 150, y: 200, width: 80, height: 80,
          fill: "#FF5722", number: 1,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 250, y: 200, width: 160, height: 80,
          fill: "#7633ff", number: 2,
          originalX: 250, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 240, height: 80,
          fill: "#2196F3", number:3,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      // 动态生成目标框，数量与矩形数量一致
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 80, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 160, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 240, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#9C27B0"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 3 // 两边总和需要达到的值
    },
    {
      name: "第二十三关 - 天平平衡",
      description: "让天平两边数字都等于4",
      rectangles: [
        {
          x: 150, y: 200, width: 80, height: 80,
          fill: "#00ff99", number: 1,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 250, y: 200, width: 240, height: 80,
          fill: "#225544", number: 3,
          originalX: 250, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 320, height: 80,
          fill: "#765328", number:4,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      // 动态生成目标框，数量与矩形数量一致
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 80, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 240, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 320, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#9C27B0"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 4 // 两边总和需要达到的值
    },
    {
      name: "第二十四关 - 天平平衡",
      description: "让天平两边数字都等于4",
      rectangles: [
        {
          x: 150, y: 200, width: 160, height: 80,
          fill: "#668844", number: 2,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 320, y: 200, width: 160, height: 80,
          fill: "#668844", number: 2,
          originalX: 320, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 320, height: 80,
          fill: "#554455", number:4,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      // 动态生成目标框，数量与矩形数量一致
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 160, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 160, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 320, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#9C27B0"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 4 // 两边总和需要达到的值
    },
    {
      name: "第二十五关 - 天平平衡",
      description: "让天平两边数字都等于5",
      rectangles: [
        {
          x: 150, y: 200, width: 80, height: 80,
          fill: "#908070", number: 1,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 320, y: 200, width: 320, height: 80,
          fill: "#708090", number: 4,
          originalX: 320, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 400, height: 80,
          fill: "#090807", number:5,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      // 动态生成目标框，数量与矩形数量一致
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 80, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 320, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 400, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#9C27B0"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 5 
    },
    {
      name: "第二十六关 - 天平平衡",
      description: "让天平两边数字都等于5",
      rectangles: [
        {
          x: 150, y: 200, width: 160, height: 80,
          fill: "#665439", number: 2,
          originalX: 150, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 320, y: 200, width: 240, height: 80,
          fill: "#395488", number: 3,
          originalX: 320, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "left"
        },
        {
          x: 650, y: 200, width: 400, height: 80,
          fill: "#999999", number:5,
          originalX: 650, originalY: 200, targetIndex: null,
          canSplit: false,
          side: "right"
        }
      ],
      targetBoxes: [
        // 左侧目标框
        { x: 0, y: 0, width: 160, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        { x: 0, y: 0, width: 240, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "left" },
        // 右侧目标框
        { x: 0, y: 0, width: 400, height: 80, color: "#333", 
          matched: false, occupied: false, occupiedBy: null, side: "right" }
      ],
      mergedRectangle: {
        x: 0, y: 0, width: 0, height: 0, fill: "#333333"
      },
      split: false,
      type: "balance-scale",
      requiredSum: 5 
    },
  ];